package net.linxuehua.server.dto;/**
 * @author chenyan
 * @createTime 2021/1/12 9:40
 * @description description
 */

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import net.linxuehua.server.po.Desk;

@Data
public class DeskDTO {
    /**
     *
     */
    @ApiModelProperty(value = "", dataType = "int")
    private Integer deskId;

    /**
     * 名称
     */
    @ApiModelProperty(value = "名称", dataType = "String")
    private String deskName;

    /**
     * 位置
     */
    @ApiModelProperty(value = "位置", dataType = "String")
    private String position;

    public Desk toDesk() {
        Desk desk = new Desk();
        if (this.deskId != null && this.getDeskId() != 0) {
            desk.setDeskId(this.getDeskId());
        }
        desk.setDeskName(this.getDeskName());
        desk.setPosition(this.getPosition());
        return desk;
    }

}
